package proxy;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Proxy;

public class JdkProxyFactory implements IProxyFactory {

	@SuppressWarnings("unchecked")
	public <T> T getProxy(Class<T> clz, InvocationHandler invocationHandler) {
		return (T) Proxy.newProxyInstance(this.getClass().getClassLoader(), new Class[] { clz }, invocationHandler);
	}

}
